/*
 * Copyright (C) 2012 TAIJI COMPUTER All Rights Reserved.
 */
package cn.com.taiji.oospub.wechat.common;

import com.fasterxml.jackson.annotation.JsonValue;

import java.util.LinkedHashMap;
import java.util.Map;


/**
 * @author sunwei Email：sunwei@mail.taiji.com.cn
 * @version : 1.0
 * @ClassName: Finals
 * @date 2012-8-17 - 上午10:13:17
 */
public class Finals {


    public static final String pageSize = "10";
    public static final String pageIndex = "0";
    public static final String PROPERTIES_PATH = "classpath:config/common.properties";


    //public static final String kongxc_pos_http_server_url="http://192.168.164.28:8080/pospub/servlet/httpServer.jsp";
    //public String PROPASS = "123456";
    //public String PROJECT_CODE = "7035008";
    //public String CUS_NAME = "70B2020";

    //管理员帐号类型  1:总部帐号 2:学校帐号 --用户管理使用
    public static final String ACCOUNT_TYPE_HEAD = "1";
    public static final String ACCOUNT_TYPE_SCHOOL = "2";

    //角色类型  1:总部角色 2:学校角色 --给总部用户或学校用户使用
    public static final String ROLE_TYPE_HEAD = "1";
    public static final String ROLE_TYPE_SCHOOL = "2";

    //订单类型 1:自取订单 2:送餐订单
    public static final String ORDER_TYPE_SELF = "1";
    public static final String ORDER_TYPE_SEND = "2";

    //菜品类型 1:普通 2:新品 3:推荐
    public static final String FOOD_TYPE_COMMON = "1";
    public static final String FOOD_TYPE_NEW = "2";
    public static final String FOOD_TYPE_FIRST = "3";

    //是否历史数据(1:不是 2:是) --黑名单用户使用
    public static final String HISTORY_NO = "1";
    public static final String HISTORY_YES = "2";

    //拉入类型(1:自动拉入 2:手动拉入) --黑名单用户使用
    public static final String BLACK_TYPE_AUTO = "1";
    public static final String BLACK_TYPE_SELF = "2";

    //下单时间设置，1：开启  2：关闭 --下单时间设置使用
    public static final String ISOPEN = "1";
    public static final String ISCLOSE = "2";

    //营养成分编号   能量、碳水化合物、膳食纤维、蛋白质、脂肪
    public static final String NUT_CODE_NL = "NA01";
    public static final String NUT_CODE_TSHHW = "NA02";
    public static final String NUT_CODE_SSXW = "NA03";
    public static final String NUT_CODE_DBZ = "NA04";
    public static final String NUT_CODE_ZF = "NA05";
    public static final String NUT_CODE_XW = "NA08";

    //早餐01;午餐02;晚餐;大夜宵04;小夜宵05;加班06
    public static final String CANCI_ZAO = "01";
    public static final String CANCI_WU = "02";
    public static final String CANCI_WAN = "03";
    public static final String CANCI_DAYEXIAO = "04";
    public static final String CANCI_XIAOYEXIAO = "05";
    public static final String CANCI_JIABAN = "06";
    public static final String CANCI_NO = "10";//------用户POS订单推送到oos的时候在类ReturnOrder

    //    早餐01;午餐02;晚餐;大夜宵04;小夜宵05;加班06
    public static final Map<String, String> CANCI = new LinkedHashMap<String, String>();

    static {
        CANCI.put("01", "早餐");
        CANCI.put("02", "午餐");
        CANCI.put("03", "晚餐");
        CANCI.put("04", "大夜宵");
        CANCI.put("05", "小夜宵");
        CANCI.put("06", "加班");
        CANCI.put("10", "pos和oos不匹配");
    }


    public enum MealType {
        dc("点餐") {},
        wm("外卖") {},
        yd("预订") {},
        xx("线下") {},
        dcwm("点餐外卖") {};

        @JsonValue
        private String value;

        MealType(String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }
    }

    public enum ZhOrEn {
        Z("中文") {},
        E("英文") {};

        private String value;

        ZhOrEn(String value) {
            this.value = value;
        }

        @JsonValue
        public String getValue() {
            return value;
        }

        @Override
        public String toString() {
            return this.getValue();
        }
    }

    //--------------->0:代表项目没有pos;1:代表项目有pos<---------------


    public static final String SCHOOL_NO_HAS_POS = "0";
    public static final String SCHOOL_HAS_POS = "1";

    //--------------->短息发送工具<---------------

    public static String corpID = "amk";
    public static String pwd = "111111";
    public static String mobile = "15283531823";


    private static String urlPrefix = "http://qxt.ccme.cc/ws/";//前缀

    public static String getRegUrl() {
        return urlPrefix + "Reg.aspx";
    }

    public static String getUpdPwdUrl() {
        return urlPrefix + "UpdPwd.aspx";
    }

    public static String getUpdRegUrl() {
        return urlPrefix + "UpdReg.aspx";
    }

    public static String getSelSumUrl() {
        return urlPrefix + "SelSum.aspx";
    }

    public static String getSendUrl() {
        return urlPrefix + "Send.aspx";
    }

    public static String duanxinUrl = urlPrefix + "Send.aspx";

    public enum OrderStatus {
        NOPAY("未支付") {},
        NOPRINT("已支付") {},
        PREPARE("备货中") {},
        PRINTED("已打印") {},
        SUCESS("交易成功") {},
        FAIL("交易失败") {},
        DELETE("已销毁") {},
        REVOKED("已撤销") {},
        TUIKUANING("退款中") {},
        TUIKUANED("退款完成") {},
        PAYONLINE("已在线支付") {};

        @JsonValue
        private String value;

        OrderStatus(String value) {
            this.value = value;
        }

        public String getValue() {
            return value;
        }

    }


    //  -----------业务类型开始-------------
    public static final Map<String, String> BusinessType = new LinkedHashMap<String, String>();

    static {
        BusinessType.put("01", "员工餐-restaurant");
        BusinessType.put("02", "宴会-banquet");
        BusinessType.put("03", "高级-VIP");
        BusinessType.put("04", "其他D-Other D");
        BusinessType.put("05", "其他-Other");
        BusinessType.put("06", "其他W-Other W");
        BusinessType.put("07", "小灶-c store");
        BusinessType.put("08", "管理费-management fee");
        BusinessType.put("09", "咖啡吧-coffee");
        BusinessType.put("10", "促销-promotions");
    }
//  -----------业务类型结束-------------
}
